//搜索框
let sousuo = document.querySelector('.icon-weimingmingwenjianjia_sousuo')
let ipt1 = document.querySelector('.sousuo-ipt')
let list = document.querySelector('.list')
ipt1.onclick = function(evt) {
	sousuo.style.display = 'none'
	evt.stopPropagation() //阻止事件冒泡
	ipt1.oninput = function() {
		list.style.display = 'block'
		
	}
}
sousuo.onclick = function(evt) {
	sousuo.style.display = 'none'
	ipt1.focus()
	evt.stopPropagation()
		list.style.display='block'
}
document.onclick = function() {
	sousuo.style.display = 'block'
	ipt1.value = ''
	list.style.display = 'none'
}
let nav=document.getElementById('uls')




//商品选项卡
let lis = document.querySelectorAll('#tab li')
let boxs = document.querySelectorAll('#tab div')
for (let i = 0; i < lis.length; i++) {
	lis[i].onclick = function() {

		for (let j = 0; j < lis.length; j++) {
			lis[j].classList.remove('liss')
			boxs[j].style.display = 'none'
		}

		lis[i].classList.add('liss')
		boxs[i].style.display = 'block'


	}
}



//footer-iconfont
let foolis = document.querySelectorAll('.foo li span')
for (let i = 0; i < foolis.length; i++) {
	foolis[i].onclick = function() {
		for (let j = 0; j < foolis.length; j++) {
			foolis[j].style.color = '#9f9f9f'
		}
		foolis[i].style.color = '#fb3939'

	}
} 
